package com.zhou.controller;

/**
 * IndexController
 *
 * @author zhouxianfeng
 * @date 2021-6-14
 */

import com.zhou.domain.User;
import com.zhou.repository.UserRepository;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * Created on 2018/3/23.
 *
 * @author zlf
 * @since 1.0
 */
@RestController
public class IndexController {

    @Autowired
    private UserRepository userRepository;

    @GetMapping("/")
    public String index() {
        User user = new User();
        userRepository.save(user);
        return "Spring Boot - Spring Data JPA - H2 Web Console";
    }
}